版权声明:本文为博主原创文章,转载请注明出处:http://blog.jerkybible.com/2013/10/20/2013-10-20-CODE 87 Permutations/
访问原文「CODE 87. Permutations」
Given a collection of numbers, return all possible permutations.
For example,[1,2,3]
have the following permutations:[1,2,3]
, [1,3,2]
, [2,1,3]
, [2,3,1]
, [3,1,2]
,
and [3,2,1]
.
|
|